<?php

namespace hotel\common\models;

use Yii;

/**
 * This is the model class for table "activity_log".
 *
 * @property int $id
 * @property int $order_sn
 * @property int $activity_id
 * @property string $date
 * @property string $name
 * @property string $phone
 * @property string $pay_price
 * @property string $discount
 * @property string $payment_code
 * @property int $order_state 订单状态：0-已取消 1(默认):未付款;2:已付款;
 * @property string $create_time
 * @property string $payment_time
 */
class ActivityLog extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'activity_log';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['order_sn', 'activity_id', 'order_state'], 'integer'],
            [['date', 'create_time', 'payment_time'], 'safe'],
            [['pay_price', 'discount'], 'number'],
            [['name', 'phone'], 'string', 'max' => 100],
            [['payment_code'], 'string', 'max' => 32],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'order_sn' => 'Order Sn',
            'activity_id' => 'Activity ID',
            'date' => 'Date',
            'name' => 'Name',
            'phone' => 'Phone',
            'pay_price' => 'Pay Price',
            'discount' => 'Discount',
            'payment_code' => 'Payment Code',
            'order_state' => 'Order State',
            'create_time' => 'Create Time',
            'payment_time' => 'Payment Time',
        ];
    }
}
